package xin.nick.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import xin.nick.api.fallback.UserServiceApiFallbackFactory;

import java.util.List;

/**
 * @author Nick
 * @since 2023/4/16
 */
@FeignClient(
        contextId = "user-service-api",
        name = "user-service",
        path = "/api/user",
        fallbackFactory = UserServiceApiFallbackFactory.class
)
public interface UserServiceApi {

    @GetMapping(value = "/getAllList")
    List<String> getAllList(@RequestParam(value = "username", required = false) String username);

    @GetMapping(value = "/getUserByUsername")
    List<String> getUserByUsername(@RequestParam(value = "username", required = false) String username);

}
